<!DOCTYPE html>
<html>
  <head>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <meta content="utf-8" http-equiv="encoding" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <!--
  /*******************************************************************************
   
    Cloud Firewall - a browser extension/addon that allows you to toggle blocking 
    ON or OFF for allowing your browser to connect to web pages and web resources (
    like images, videos) hosted on popular top 5 cloud/companies.
    Copyright (C) 2019 Niklas Poslovski
    Copyright (C) 2019 Gokulakrishna Sudharsan

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    Home: https://notabug.org/nipos/cloud-firewall
*/
-->

    <title>Cloud Firewall</title>
    <link rel="stylesheet" href="css/popup2.css" />
    <link rel="stylesheet" href="css/toggleswitch.css" />

    <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" />
    <script src="libraries/jquery-3.4.1.min.js"></script>
    <script src="libraries/tomlify.js"></script>
    <script src="js/popup/variables.js"></script>
    <script src="js/popup/registerListeners.js"></script>
    <script src="libraries/publicsuffixlist.min.js"></script>
    <script src="libraries/punycode.js"></script>
    <script src="libraries/uritools.js"></script>
    <script src="libraries/json2yaml.js"></script>
    <script src="libraries/JSON2Plain.js"></script>
    <script src="libraries/cson-parser-4.0.3-stringify.js"></script>
    <script src="js/dom/DOMUpdater.js"></script>
    <script src="js/dom/common.js"></script>
    <script src="js/popup/popup.js"></script>
  </head>
  <!--https://codepen.io/ondrejsvestka/pen/qmbeMe-->
  <!--https://stackoverflow.com/questions/20979062/bootstrap-right-column-on-top-on-mobile-view-->
  <body class="hideBody">
    
	<div id="titlediv" style="white-space: nowrap;">
		<div id="titledivinner">
			<img id="titlelogo" class="icon-light" src="images/shield.svg"/><img id="titlelogo" class="icon-dark" src="images/shield-light.svg"/>
			<span id="title"><strong>Cloud&nbsp;Firewall</strong></span>
		</div>
    </div>
	
    <div id="rowdiv">
      <div class="col" id="statsTableDesktop">
        <table id="statstable">
          <tr id="showstats" class="spaceUnder">
            <td>
              <div id="connectionsblockeddiv">
                <img id="connectionsblockedicon" class="icon-light" src="images/red-ban.svg"/><img id="connectionsblockedicon" class="icon-dark" src="images/true-red-ban.svg"/><b><i18n>connectionsblocked</i18n></b>
              </div>
              <div id="sinceinstallationdiv"><b><i18n>sinceinstallation</i18n></b></div>
              <div id="countsgoogle"></div>

              <div id="countsamazon"></div>

              <div id="countsfacebook"></div>

              <div  id="countsapple"></div>

              <div id="countsmicrosoft"></div>
			  
              <div id="countscloudflare"></div>
              <b>
				<div id="countstotal"></div>
			  </b>
            </td>
          </tr>

          <tr id="pageshowstats" class="spaceUnder">
            <td>
              <div id="onthispagediv"><b><i18n>onthispage</i18n></b></div>
              <div id="hostnameToDisplay"></div>
              <div id="pagecountsgoogle"></div>

              <div id="pagecountsamazon"></div>

              <div id="pagecountsfacebook"></div>

              <div id="pagecountsapple"></div>

              <div id="pagecountsmicrosoft"></div>
             
			 <div id="pagecountscloudflare"></div>
              <b>
                <div id="pagecountstotal"></div>
			  </b><br>
              <span id="copyBtnArea">
				<a class="btn btn-lightblue" id="showInPopup" tabindex="-1"><i18n>showurlsinpopup</i18n></a><br><br><br>
              <div><i18n>copy</i18n> <span id="allText"></span><span id="totalcountsForCopyBtn"></span><span id="urlText"></span> <i18n>as</i18n>:</div><br><div><a class="btn btn-blue" id="copyToClipboardYAML" tabindex="-1">YAML</a><a class="btn btn-blue" id="copyToClipboardTOML" tabindex="-1">TOML</a><a class="btn btn-blue" id="copyToClipboardPlain" tabindex="-1">Plain</a><a class="btn btn-blue" id="copyToClipboardCSON" tabindex="-1">CSON</a><a class="btn btn-blue" id="copyToClipboardJSON" tabindex="-1">JSON</a></div></span>
            </td>
          </tr>

          <!--  <a class="btn blue large" href="help.html" target="_blank">Help</a>-->
        </table>
      </div>
      <div id="uidiv">
        <table
          width="100%"
          style="min-width: 120px; "
          align="center"
          id="tableMain"
        >
          <!--
      <tr class="spaceUnder" id="showenablebutton" align="center">
        <td>
          <div class="alert alert-danger" tabindex="-1" style="">
            Cloud Firewall is disabled!
          </div>
          <button
            type="button"
            class="btn btn-success btn-sm"
            id="enablebutton"
            tabindex="-1"
          >
            Enable Cloud Firewall
          </button>
        </td>
      </tr> -->
          <tr class="spaceUnder" align="center" id="settingsbuttonarea">
            <td>
              <button type="button" class="btn btn-blue" id="settingsbutton" tabindex="-1"><i18n>settings</i18n></button>
              <button type="button" class="btn btn-lightblue" id="helpButton"><i18n>help</i18n></button>
              <button type="button" class="btn btn-green" id="rulesbutton" tabindex="-1"><i18n>rules<i18n></button>
              <br />
            </td>
          </tr>

          <tr class="spaceUnder" align="left" id="togglegroup">
            <td>
<center id="infocenter">
<a href="#" class="badge badge-pill badge-danger" id="resetRule" style="display:none">&times;</a>
<span class="badge badge-info" id="infoRule"></span>
</center>

	<div id="switchdiv">
              <label class="md_switch">
                <input type="checkbox" id="switchgoogle" />
                <span class="md_switch__toggle"></span>
                &nbsp;&nbsp;&nbsp;<i18n>blockgoogle</i18n></label><br />

              <label class="md_switch">
                <input type="checkbox" id="switchamazon" />
                <span class="md_switch__toggle"></span>
                &nbsp;&nbsp;&nbsp;<i18n>blockamazon</i18n></label><br />

              <label class="md_switch">
                <input type="checkbox" id="switchfacebook" />
                <span class="md_switch__toggle"></span>
                &nbsp;&nbsp;&nbsp;<i18n>blockfacebook</i18n></label><br />

              <label class="md_switch" data-on="yes" data-off="no">
                <input type="checkbox" id="switchapple" />
                <span class="md_switch__toggle"></span>
                &nbsp;&nbsp;&nbsp;<i18n>blockapple</i18n></label><br />

              <label class="md_switch">
                <input type="checkbox" id="switchmicrosoft" />
                <span class="md_switch__toggle"></span>
                &nbsp;&nbsp;&nbsp;<i18n>blockmicrosoft</i18n></label><br />

              <label class="md_switch" data-on="yes" data-off="no">
                <input type="checkbox" id="switchcloudflare" />
                <span class="md_switch__toggle"></span>
                <span style="display: inline;">
                &nbsp;&nbsp;&nbsp;<i18n>blockcloudflare</i18n></span></label>
		</div>

<!--               <span id="2BR"><br /></span>
 -->            
 <br/>  <!-- <div>
                <div
                  class="alert alert-info"
                  tabindex="-1"
                  id="inExcludesAlert"
                  style="display:none;"
                ></div> -->
                <button class="btn btn-all" type="button" id="blockAllButton" tabindex="-1"><i18n>blockall</i18n></button>&nbsp;&nbsp;&nbsp;
                <button class="btn btn-all" type="button" id="allowAllButton" tabindex="-1"><i18n>allowall</i18n></button>
                <br><br>

                <div align="center">
                  <div id="inExcludesAlertWrapper" class="badge badge-alert-info" style="display:none;"><img class="badge-alert-info-img" src="images/alert-darkyellow.svg">
                <a id="inExcludesAlert" tabindex="-1"></a>
              </div><br>
                  <button class="btn btn-red" id="openExcludePopup" tabindex="-1" style="white-space:normal;word-wrap:anywhere"><i18n>disablefor</i18n> {domain}</button>
                  <button class="btn btn-green" id="removeFromExcludes" tabindex="-1" style="white-space:normal;word-wrap:anywhere"><i18n>include</i18n> {domain}</button>
                </div>
              </div>
            </td>
          </tr>

          <!-- 
      <tr class="spaceUnder" align="center" id="showdisablebutton">
        <td>
          <button
            type="button"
            class="btn btn-outline-dark btn-sm"
            id="disablebutton"
            tabindex="-1"
          >
            Disable Cloud Firewall temporarily
          </button>
        </td>
      </tr>
-->
          <!--   <tr class="spaceUnder" align="center">
        <td>
          <button
            type="button"
            class="btn btn-info btn-sm formfineleft"
            id="helpButton"
          >
            Help
          </button>
        </td>
      </tr> -->
        </table>
      </div>
    </div>

    <!-- temporary duplicate of stats table as I don't yet have the time to do bootstrap classes things to push left column table to bottom of screen in android firefox screen-->
    <table
      id="statsTableAndroid"
      width="100%"
      style="min-width: 120px; "
    >
      <!-- <div id="inExcludesAlertWrapper" style="display:none;">
        <div id="inExcludesAlert" class="alert alert-info" tabindex="-1"></div>
      </div> -->
     <tr id="showstats" class="spaceUnder">
            <td>
              <div id="connectionsblockeddiv">
                <img id="connectionsblockedicon" src="images/red-ban.svg"/><b><i18n>connectionsblocked</i18n></b>
              </div>
              <div id="sinceinstallationdiv"><b><i18n>sinceinstallation</i18n></b></div>
              <div id="countsgoogle"></div>
			  
              <div id="countsamazon"></div>

              <div id="countsfacebook"></div>

              <div  id="countsapple"></div>

              <div id="countsmicrosoft"></div>
			  
              <div id="countscloudflare"></div>
              <b>
				<div id="countstotal"></div>
			  </b>
            </td>
          </tr>

          <tr id="pageshowstats" class="spaceUnder">
            <td>
              <div id="onthispagediv"><b><i18n>onthispage</i18n></b></div>
              <div id="hostnameToDisplay"></div>
              <div id="pagecountsgoogle"></div>

              <div id="pagecountsamazon"></div>

              <div id="pagecountsfacebook"></div>

              <div id="pagecountsapple"></div>

              <div id="pagecountsmicrosoft"></div>
             
			 <div id="pagecountscloudflare"></div>
              <b>
                <div id="pagecountstotal"></div>
			  </b><br>
              <span id="copyBtnArea">
				<a class="btn btn-lightblue" id="showInPopup" tabindex="-1"><i18n>showurlsinpopup</i18n></a><br><br><br>
              <div><i18n>copy</i18n> <i18n>as</i18n>:</div><div><a class="btn btn-outline-dark btn-sm" id="copyToClipboardYAML" tabindex="-1">YAML</a><a class="btn btn-outline-dark btn-sm" id="copyToClipboardTOML" tabindex="-1">TOML</a><a class="btn btn-outline-dark btn-sm" id="copyToClipboardPlain" tabindex="-1">Plain</a><a class="btn btn-outline-dark btn-sm" id="copyToClipboardCSON" tabindex="-1">CSON</a><a class="btn btn-outline-dark btn-sm" id="copyToClipboardJSON" tabindex="-1">JSON</a></div></span>
            </td>
          </tr>

          <!--  <a class="btn blue large" href="help.html" target="_blank">Help</a>-->
        </table>

    <div style="margin: 0px; padding: 0px; border: 0px solid rgb(6, 117, 211); font-size: 19px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1; font-family: sans-serif; vertical-align: baseline; box-sizing: content-box; overflow: unset; height: 1px; position: relative; width: auto; display: flex; background-color: rgb(9, 150, 248); color: rgb(255, 255, 255); text-align: left; align-items: center; border-radius: 3px; justify-content: center; text-decoration: none;"></div>

    <footer>
      <small><div style="text-align:center;" id="versiondisplay"></div></small>
    </footer>
<div id="excludePopup">
<h1><i18n>addexception</i18n></h1>
<div style="margin: 0px; padding: 0px; border: 0px solid rgb(6, 117, 211); font-size: 19px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1; font-family: sans-serif; vertical-align: baseline; box-sizing: content-box; overflow: unset; height: 1px; position: relative; width: auto; display: flex; background-color: rgb(9, 150, 248); color: rgb(255, 255, 255); text-align: left; align-items: center; border-radius: 3px; justify-content: center; text-decoration: none;"></div>
<i18n>exceptionlifetime</i18n><br/>
<button class="btn btn-red addToExcludes" data-lifetime="permanent" tabindex="-1" style="white-space:normal;word-wrap:anywhere"><i18n>disableforever</i18n></button><p></p>
<button class="btn btn-red addToExcludes" data-lifetime="session" tabindex="-1" style="white-space:normal;word-wrap:anywhere"><i18n>disableforsession</i18n></button><p></p>
<button class="btn btn-red addToExcludes" data-lifetime="visit" tabindex="-1" style="white-space:normal;word-wrap:anywhere"><i18n>disableforvisit</i18n></button>
</div>
  </body>
  <script src="js/i18n.js"></script>
</html>
